<?php
class data_error_devel extends data {

	public function __construct ($msg, $vars='', $class_name='', $function_name='', $line='') {
		parent::__construct();
		
		$filename = $class_name.'::'.$function_name.'@'.$line;
		
		if (is_array($vars)) {
			$vars = serialize($vars);
		} else {
			$vars = '';
		}
		$insert_id = $this->db->execute('
				insert into 
					error_devel
				set
					`msg`			= "' . addslashes($msg) . '",
					`filename`		= "' . addslashes($filename) . '",
					`vars`			= \'' . $vars . '\'
		');
		
		return $insert_id;
	}
}
?>